1. Field of the Invention
The present invention generally relates to generating network messages and in particular to customizing protocol handshaking.
2. Background Technology
Transferring data is a common function performed by computers and between computers in a network. To achieve the transfer of data, the communicating computers or devices typically follow some type of protocol. One of the protocols used in computers today is Serial Advanced Technology Attachment (SATA). SATA is a serial protocol that enables the rapid transfer of data using thinner cables. SATA is often frequently used, for example, to transfer data to a disk drive and/or from a disk drive.
In order for devices to communicate using a protocol, it is desirable to ensure that the devices comply with most the requirements of the protocol. In fact, when a host is communicating with a device, successful communication typically only occurs when both the host and the device comply with the requirements of the protocol. There are many situations where is it useful to examine how a device responds to a protocol or to monitor a bus to determine what is being transmitted as the host and device communicate using the protocol. In other words, it is often useful to test the protocol itself as well as how the host and/or device respond to the protocol.
One device used to perform such testing is a traffic generator. Traffic generators may be configured to perform different scenarios, typically emulating a host or a device. For example, the traffic generator may be configured to generate traffic (such as, packets, primitives or other network messages), insert the traffic into a data stream, and monitor how the recipient responds to the generated traffic.
In performing these different scenarios, it may be desirable for the traffic generator to comply with a particular protocol in some instances and not comply with the protocol in other instances. For example, it may be desirable for the traffic generator to comply with a particular protocol when testing how well a recipient responds to protocol-compliant traffic. Also, for example, it may be desirable for the traffic generator not to comply with a particular protocol to discover how a recipient responds to non-compliant traffic.
However, ensuring that the traffic generator complies with a protocol, when desired, may be difficult. In particular, traffic generators may use scripts to perform different scenarios, and the time required to process such scripts may make it difficult to comply with the protocol. For example, the traffic generator may not be able to process the script fast enough to comply with the protocol. In addition, creating the scripts may be a time consuming process for a user of the traffic generator.